package com.zmm.study.mes.config;

import com.baomidou.mybatisplus.core.config.GlobalConfig;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * description
 * name MybatisPlusConfig
 *
 * @author Zebulon
 * @date by 2022-05-05 20:32:37
 */
@EnableTransactionManagement
@Configuration
public class MybatisPlusConfig {

    /**
     * 设置策略
     */
    @Bean
    public GlobalConfig globalConfiguration() {
        GlobalConfig conf = new GlobalConfig();
        conf.setMetaObjectHandler(new SpMetaObjectHandler());
        return conf;
    }
}
